home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / src / tools / Makefile < prev    next >
Makefile  |  1995-07-05  |  2KB  |  64 lines

  1. CAMLCOMP = ::camlrun ::camlcomp -W -stdlib ::lib:
  2. CAMLLINK = ::camlrun ::camllink -stdlib ::lib:
  3. CAMLLEX = ::camlrun ::camllex
  4. INCLUDES = -I ::compiler: -I ::linker:
  5. COMPFLAGS = -O fast {INCLUDES}
  6. LINKFLAGS = -g {INCLUDES}
  7.  
  8. all ƒ dumpsymb cldumpobj findmsgs clprepro
  9.  
  10. clprepro ƒ clprepro.68k.o clprepro.PPC.o
  11.     {LINK68k} {LINKTOOL68k} -sym on -c 'MPS ' -t MPST -o clprepro68k ∂
  12.               {TOOLLIBS68k} clprepro.68k.o
  13.     {LINKPPC} -c 'MPS ' -t MPST -sym on -o clpreproPPC {TOOLLIBSPPC} ∂
  14.               clprepro.PPC.o
  15.     set ppcsize `count -c clpreproPPC`
  16.     if {ppcsize}
  17.       rez -a -d PPC_CODE_SIZE={ppcsize} cfrg.r -o clpreproPPC
  18.     end
  19.     :fatmerge :clpreproPPC :clprepro68k :clprepro
  20.  
  21. dumpsymb ƒ dumpsymb.zo
  22.     {CAMLLINK} {LINKFLAGS} -o dumpsymb stdlib.zo dumpsymb.zo
  23.     
  24. cldumpobj ƒ opnames.zo dumpobj.zo
  25.     {CAMLLINK} {LINKFLAGS} -o cldumpobj stdlib.zo opcodes.zo opnames.zo dumpobj.zo
  26.  
  27. findmsgs ƒ scanmsgs.zo findmsgs.zo
  28.     {CAMLLINK} {LINKFLAGS} -o findmsgs stdlib.zo scanmsgs.zo findmsgs.zo
  29.  
  30. .zo ƒ .ml
  31.     {CAMLCOMP} {COMPFLAGS} {Default}.ml
  32.  
  33. opnames.ml ƒ ::runtime:instruct.h
  34.     duplicate -y ::runtime:instruct.h opnames.ml
  35.     set casesensitive 1
  36.     open opnames.ml
  37.     find • opnames.ml; clear -c ∞ /•≈'/*'≈∂n/ opnames.ml
  38.     find • opnames.ml; replace -c ∞ /enum ([a-z_]+)®0≈/ "let names_of_®0 = [|" opnames.ml
  39.     find • opnames.ml; replace -c ∞ /'};'∞/ '|];;' opnames.ml
  40.     find • opnames.ml; replace -c ∞ /([A-Z][A-Z_0-9]*)®0/ '"®0"' opnames.ml
  41.     find • opnames.ml; replace -c ∞ /,/ ';' opnames.ml
  42.     close -y opnames.ml
  43.  
  44. scanmsgs.ml ƒ scanmsgs.mll
  45.     {CAMLLEX} scanmsgs.mll
  46.  
  47. .68k.o ƒ .c
  48.     {C68k} {Default}.c -o {default}.68k.o -s {Default}
  49.  
  50. .PPC.o ƒ .c
  51.     {CPPC} {default}.c -o {default}.PPC.o
  52.  
  53. clean ƒ
  54.     delete -i cldumpobj dumpsymb opnames.ml findmsgs scanmsgs.ml clprepro ∂
  55.               clprepro68k clprepro68k.SYM clpreproPPC clpreproPPC.xSYM
  56.     delete -i ≈.z[io] ||echo
  57.     delete -i ≈.o ||echo
  58.  
  59. gensrc depend ƒ
  60.     #
  61.  
  62. install ƒ
  63.     duplicate -y ppclink-makepef "{BINDIR}"
  64.